{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#生成两个取值范围不同的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[6, 9],\n",
       "       [6, 1],\n",
       "       [1, 2],\n",
       "       [8, 7],\n",
       "       [3, 5]])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(1)\n",
    "X1 = np.random.randint(1,10,size=10).reshape(-1,2)\n",
    "X1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[15, 18],\n",
       "       [19, 15],\n",
       "       [10, 10],\n",
       "       [11, 17],\n",
       "       [16, 19]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(1)\n",
    "X2 = np.random.randint(10,20,size=10).reshape(-1,2)\n",
    "X2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "##将两个数据进行合并"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train = np.concatenate([X1,X2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#生成特征数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = np.array([0,0,0,0,0,1,1,1,1,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "#生成一个待测点数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "x=np.array([9,10])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "#将特征数据和待测数据一起绘制出来"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD8CAYAAABzTgP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAFa5JREFUeJzt3X+M3HWdx/HXa6H8sdiUcl2wFHZHDSHR64HcpOpxErRSS8MPNcaDTLSnJCMGEknuErnbBH9lEz2jR/wRyYgEvMwhMVqFswhNY4ImgmybQssVbSHdUttrF2u2mjWR6vv+mO/KfmZndmd3fm+fj2Ty/X4/3893vu9+O51Xvz/HESEAAGYMdLsAAEBvIRgAAAmCAQCQIBgAAAmCAQCQIBgAAIkFg8H2JbZ/anu/7edtfzJrP9/2DtsHsuHqOstvzfocsL211X8AAEBreaH7GGyvlbQ2InbbXilpl6T3SfpnSScj4gu275K0OiI+VbXs+ZLGJeUlRbbs30fE71r+JwEAtMSCewwRcSwidmfjv5e0X9I6STdJejDr9qAqYVHtvZJ2RMTJLAx2SNrcisIBAO1x9mI6285JequkpyVdGBHHpEp42L6gxiLrJL08a/pI1javNWvWRC6XW0xpAHBG27Vr1ysRMdSK92o4GGy/TtL3Jd0ZEadsN7RYjbaax65sFyUVJWl4eFjj4+ONlgYAZzzbE616r4auSrK9QpVQKEfED7Lm49n5h5nzECdqLHpE0iWzpi+WdLTWOiKiFBH5iMgPDbUk9AAAS9DIVUmW9G1J+yPiK7NmPSJp5iqjrZJ+VGPxxyVtsr06u2ppU9YGAOhRjewxXCXpw5LebXtP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pyT9QxfqfGO2/mezWkaz9tl1WtI3VLnaY6+kfJe26aAqX/SrZrX1xPZUJayOSXpVlf9h3SrpbyTtlHQgG56f9c1Lum/Wsh+TdDB7fbTDNR5U5fjxzGf03qzvRZK2z/cZ6cL2/K/s8/ecKl9oa6trzaa3qHLVzYvtrrVWnVn7AzOfy1l9u7ZN5/k+astnlDufAQAJDiUBABIEAwAgQTAAABIEAwAgQTAAABIEAwAgQTAAABIEAwAg8f9r2Pf4sI8dfAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X_train[y_train==0,0],X_train[y_train==0,1],color='r')\n",
    "plt.scatter(X_train[y_train==1,0],X_train[y_train==1,1],color='g')\n",
    "plt.scatter(x[0],x[1],color='k')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "#调用距离测量函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "def distance(a,b,p=2):\n",
    "    return np.sum(np.abs(a-b)**p) ** (1/p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "#用列表式算出每个特征点与待测点间的距离"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[3.1622776601683795,\n",
       " 9.486832980505138,\n",
       " 11.313708498984761,\n",
       " 3.1622776601683795,\n",
       " 7.810249675906654,\n",
       " 10.0,\n",
       " 11.180339887498949,\n",
       " 1.0,\n",
       " 7.280109889280518,\n",
       " 11.40175425099138]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "distances = [distance(item,x) for item in X_train]\n",
    "distances"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "#将所有点与测试点的距离进行排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[10, 10],\n",
       "       [ 6,  9],\n",
       "       [ 8,  7],\n",
       "       [11, 17],\n",
       "       [ 3,  5],\n",
       "       [ 6,  1],\n",
       "       [15, 18],\n",
       "       [19, 15],\n",
       "       [ 1,  2],\n",
       "       [16, 19]])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ind = np.argsort(distances)\n",
    "X_train[ind]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "#将排序结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "k=3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 0, 0])"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train[ind[:k]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "#用Counter函数得出测试点属于哪种特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from collections import Counter\n",
    "votes = Counter(y_train[ind[:k]])\n",
    "predict_y=votes.most_common(1)[0][0]\n",
    "predict_y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "#以上KNN算法"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
